<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="f1()">点击</button>
    <!-- <img src="./案例.html" alt=""> -->
    <div></div>
    <select>
        <option value="" selected>请选择</option>
        <option value="">北京</option>
        <option value="">天津</option>
        <option value="">重庆</option>
        <option value="">上海</option>
    </select>
</body>
</html>
<script>
    // 跳转页面
    // location.href='路径'
    var div = document.querySelector('div');
    function f1() {
        var time = 5;
        var a = setInterval(function() {
            div.innerHTML = `还有${time}秒跳转到首页`;
            time--;
            if (time == 0) {
                location.href = './案例.html';
            }
        }, 1000)
    }
</script>